import { createWebHistory, createRouter } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      // 路由路径
      path: '/',
      // 路由路径所对应的页面
      component: () => import('../view/LoginView.vue')
    },
    {
      path: '/dashboard',
      component: () => import('../view/DashBoard.vue'),
      children:[
        {
          path: 'user',
          component: () => import('../view/UserView.vue'),
        },
        {
          path: 'user/:id',
          component: () => import('../view/UserDetailView.vue')
        }
      ]
    },

  ]
})

export default router;